<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="css/form.css" />
</head>

<body>
	<div id="header-wrap" data-mn=0 data-limit=2>
		<a href="###" data-link="account" data-type="ico" class="left ico-m ico-left"></a>
		<h2>提现</h2>
		<a href="###" data-link="tariff" class="right btn b-small b-red">说明</a>
	</div>
	<div class="" id="">
		<div class="tips">
			<div class="t-info">申请提现金额 <b id="tx"></b>元</div>
			<div class="t-error"></div>
		</div>
		<form>
		<ul class="form-list">
			<li class="ico-m ico-pl ico-mobile" data-type="ico">
				<div class="fl-cont form-input">
					<input type="number" id="id_input" disabled class="preset" placeholder="请输入手机号" />
				</div>
			</li>
			<li class="ico-m ico-pl ico-mail" data-type="ico">
				<div class="fl-cont form-input f-right-btn">
					<input id="yzm" type="number" placeholder="短信验证码" />
					<a href="###" id="yzm_btn" class="btn b-blue">获取验证码</a>
				</div>
			</li>
			<li class="ico-m ico-pl ico-lock-2" data-type="ico">
				<div class="fl-cont form-input f-right-ico">
					<input id="tpw_input" type="password" placeholder="请输入交易密码" />
					<a href="###"  data-type="ico" class="check-pw ico-m ico-eye" ></a>
				</div>
			</li>
		</ul>
		
		<div class="fixed-btn">
			<a href="###" data-link="extract-2" class="btn b-red"><span id="check">提现</span></a>
		</div>
		<div id="bank-card">
			<div class="card-wrap">
				<span class="bico-gongshangyinhang" ></span>
				<h3 id="">中国工商银行借记卡</h3>
				<b id="card_code"></b>
				<em id="card_name"></em>
			</div>
		</div>
		</form>
		<div class="feed-info">
			<h2>如有疑问，请咨询...</h2>
			客服电话：400-105-8851<br />
			微信客服：wuyifugui(公众号)
		</div>
	</div>
	<script>
	$(function(){
		$(".check-pw").hover(
			function(){$(this).siblings("input").attr("type","text")},
			function(){$(this).siblings("input").attr("type","password")}
		)
		var tx_temp = $.cookie("tx_temp");
		$("#tx").text(tx_temp)
		var user_id = $.cookie("user_id");
		$("#id_input").val(user_id)
		$("#yzm_btn").on("click",function(){
			yzm()
		})
		$("#check").on("click",function(){
			var yzm = $("#yzm").val();
			var id_input = $("#id_input").val();
			var id_temp = $.cookie("id_temp")
			var yzm_code = $.cookie("yzm")
			var tpw_input = $("#tpw_input").val();
			var tpw = $.cookie("tpw")
			alert(tpw_input+" | "+tpw)
			if(yzm !== yzm_code){
				$(".t-error").text("无效短信验证码").fadeIn(100)
				$(".t-info").hide()
				reset_tip()
				return false
			}else if(id_input !== id_temp && id_temp !== undefined){
				$(".t-error").text("无效手机号").fadeIn(100)
				$(".t-info").hide()
				reset_tip()
				return false
			}else if(tpw_input !== tpw){
				$(".t-error").text("交易密码错误").fadeIn(100)
				$(".t-info").hide()
				reset_tip()
				return false
			}else{
				var balance_temp = $.cookie("balance_temp");
				var free_t_temp = $.cookie("free_t_temp");
				$.cookie("balance",balance_temp)
				$.cookie("free_t",free_t_temp)
				$.cookie("balance_temp","",{expires: -1})
				$.cookie("free_t_temp","",{expires: -1})
				$.cookie("yzm","",{expires: -1})
			}
		})
	})
	</script>	
</body>

</html>
